﻿using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MvcApplication.Models
{
    public class CustomerSummary
    {
        [DisplayName("Identifier")]
        public string ID { get; set; }
        public string Name { get; set; }
        public bool Active { get; set; }
        public string ServiceLevel { get; set; }
        public string OrderCount { get; set; }
        public string MostRecentOrderDate { get; set; }

        [DisplayName("Email Address")]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        [DisplayName("Children ID")]
        [DataType(DataType.Duration)]
        public List<string> ChildrenIDs { get; set; }

        [DisplayName("Customer Info")]
        public CustomerInfo Customer { get; set; }
    }

    public class CustomerInfo
    {
        [DisplayName("The first name")]
        public string FirstName { get; set; }

        [Required]
        [DisplayName("The last Name")]
        public string LastName { get; set; }

        [DisplayName("Is active?")]
        public bool Active { get; set; }
    }
}